package net.wy.commons.util;



public class MessageUtil {
	//信息模板带参数的用这个处理参source-从模板读出来的信String strings[]
	public static String general(String source, String ...strings) {
		
		String ret="";
		
		String regex = "\\{.\\}";
		
		String temp[] = source.split(regex);
		
		if( source.startsWith("{"))
			ret += strings[0];
		
		for(int i = 0; i< temp.length ;i++){
			ret += temp[i];
			if( i < strings.length )
				ret +=strings[i];
				
		}
		
		return ret;
	}
}
